﻿($ => {
    $.getRegisterTools = ($eventEmitter, quickFilter, advancedSearch, examGrid, toolbar, params) => {
        const handleClick = (toolId, data) => {
            $eventEmitter.trigger(toolId, {
                quickFilter,
                advancedSearch,
                examGrid,
                toolbar,
                updateToolbarItems,
                params,
                data
            });
        };

        const tools = {
            // 图像评估
            imageAssessment: {
                widget: 'dxButton',
                location: 'before',
                name: '报告_图像评估',
                options: {
                    text: '图像评估',
                    icon: '/icons/antd_file_image.svg',
                    focusStateEnabled: false,
                    onClick: () => {
                        handleClick('imageAssessment');
                    },
                },
            },
            // 报告评分
            score: {
                widget: 'dxButton',
                location: 'before',
                name: '报告_报告评分',
                options: {
                    text: '报告评分',
                    icon: '/icons/antd_file_text.svg',
                    focusStateEnabled: false,
                    onClick: () => {
                        handleClick('score');
                    },
                },
            }
            //图像质量
        }
    }
})(jQuery)